#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
from datetime import *


def myprint(obj, end='\n'):
    sys.stdout.write(str(obj) + end)


def main():
    v1 = \
        '''
02-02 04:56:48.610
02-02 04:56:54.770
02-02 04:57:07.040
02-02 04:57:08.290
02-02 04:58:54.550
02-02 04:58:58.740
'''
    v1 = v1.strip().split('\n')
    for i in range(0, len(v1), 2):
        fm = '%m-%d %H:%M:%S.%f'
        d1 = datetime.strptime(v1[i], fm)
        try:
            d2 = datetime.strptime(v1[i + 1], fm)
        except IndexError:
            break
        t = d2 - d1
        myprint('%d:%d' % (t.seconds, t.microseconds / 1000))


if __name__ == '__main__':
    main()
    myprint('done')
